package xyz.xpman.prisonerfitness.view;

import android.content.Context;
import android.util.AttributeSet;

import org.jetbrains.annotations.NotNull;

import java.util.List;

import xyz.xpman.prisonerfitness.util.ImgUtil;

public class MyImageView extends androidx.appcompat.widget.AppCompatImageView {

    public MyImageView(Context context) {
        super(context);
    }

    public MyImageView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyImageView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }


    @SuppressWarnings("unused")
    public void setImageUrl(@NotNull String url) {
        ImgUtil.getImgByUrl(url, this::setImageBitmap);
    }

    @SuppressWarnings("unused")
    public void setImageUrl(@NotNull List<String> url){
        ImgUtil.getImgByUrl(url, this::setImageBitmap);
    }

}

